/**
 * AboutAction.java
 * @author: liuex
 * 2007-12-31 ����01:49:46
 *
 * note: 
 */
package lex.mtd.ui.actions;

import java.awt.event.ActionEvent;

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

public class AboutAction extends BaseAction {
	public AboutAction() {
		this.setName("About...");
		this.setMnemonic('a');
	}

	public void actionPerformed( ActionEvent e )
	{
		SwingUtilities.invokeLater( new Runnable(){
			@Override
			public void run()
			{
				JOptionPane.showMessageDialog( getRoot(), getAboutText(), "About",
					JOptionPane.INFORMATION_MESSAGE );
			}
		} );
	}

	private String getAboutText() {
		StringBuilder buf = new StringBuilder();
		buf.append("<html><h2>A Multi-thread");
		buf.append(" Download Tool</h2><h5 ");
		buf.append("align = right color = blue>");
		buf.append("coded by Daniel Liu</h5></html>");
		return buf.toString();
	}
}
